var loadMap;
require(['gaodeMap'], function () {
	 //高德地图对象
	var map;
	$('#iCenter').css({
		width : $(window).width() -10,
		height : 450
		});
	
	loadMap=function(id){
		//加载经纬度集
		$.ajaxExt({
			url : "/sysParking/getBaseParkingGpsListById.htm",
			data : [{name:'parkingId',value:id}]
		}).done(function(result){
			if(result){
				addPolygon(result);
			}			
		});
	}
	//添加多边形覆盖物  
	function addPolygon(result){ 
	  var polygonArr=new Array();//多边形覆盖物节点坐标数组	
	  $.each(result,function(index,item){
		  polygonArr.push(new AMap.LngLat(item.loLgt,item.loLtt));	
	  });
	  polygon=new AMap.Polygon({	  
	  path:polygonArr,//设置多边形边界路径  
	  strokeColor:"#0000ff", //线颜色  
	  strokeOpacity:0.2, //线透明度	
	  strokeWeight:3,	 //线宽	
	  fillColor: "#ff0000", //填充色  
	  fillOpacity: 0.35//填充透明度  
	  });	
	  map = new MapGaoDe(result[0].loLgt,result[0].loLtt, 2)
	  polygon.setMap(map.map);  
	  map.map.setZoomAndCenter(12,new AMap.LngLat(result[0].loLgt,result[0].loLtt));
	 } 
});